///数据表定义
///
const String file = "file";
const String history = "history";
const String processing = "processing";

class CreateTableSqls {
  static const String _File = '''
    CREATE TABLE IF NOT EXISTS file(
    id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, 
    name TEXT(30) , 
    path TEXT(30) , 
    star TEXT(30) ,
    selects TEXT(30) ,
    time TEXT(30) ,
    size TEXT(30) 
    );
    ''';

  static const String _history = '''
    CREATE TABLE IF NOT EXISTS history(
    id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, 
    name TEXT(30) 
    );
    ''';

  static const String _processing = '''
    CREATE TABLE IF NOT EXISTS processing(
    id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, 
    name TEXT(30) ,
    path TEXT(30) ,
    value  DOUBLE ,
    type TEXT(30) ,
    img TEXT(30) ,
    state INTEGER ,
    error TEXT(30) 
    );
    ''';

  Map<String, String> getAllTables() {
    Map<String, String> map = Map<String, String>();
    map[file] = _File;
    map[history] = _history;
    map[processing] = _processing;
    return map;
  }
}
